import { useAccount } from "../store/account"

// 根据用户的权限permission
const usePermission = (permit)=>{
    // permit = ['root','admin']
    const account = useAccount()
    const role = account.permitData.role
    let bool = permit.includes(role)
    return {
      canUse:bool,
    }
}

export default usePermission